﻿<%@ Page Title="" Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" CodeFile="Home.aspx.cs" Inherits="Home" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
    <p>Máy phát điện Công Nghiệp</p>
   <div id="machine">
     <asp:DataList ID="DataList2" runat="server" DataKeyField="id" DataSourceID="SqlDataSource1" RepeatColumns="3" >
        <ItemTemplate>
            <div id="item">
                <table style="width: 100%">
                    <tr>
                        <td>
                            <asp:Label ID="Label4" runat="server" Text='<%# Eval("name1") %>'></asp:Label>
                        </td>
                        <td>&nbsp;</td>
                    </tr>
                    <tr>
                        
                        <td colspan="2">
                           <asp:HyperLink ID="HyperLink5"  style="width:160pt;height:150pt;" runat="server"  ImageUrl='<%# Eval("Image1") %>'
                                NavigateUrl='<%# "Detail.aspx?ID="+Eval("ID1") %>' ImageHeight="150px" ImageWidth="160px" Text='<%# Eval("image") %>'></asp:HyperLink>
                        </td>
                            
                    </tr>
                    <tr>
                        <td>
                            <asp:Label ID="Label5" runat="server" Text="Giá:"></asp:Label>
                            <asp:Label ID="Label6" runat="server"
                                Text='<%# Eval("Price","{0:#,##0 VND}") %>'></asp:Label>
                        </td>
                        <td>&nbsp;</td>
                    </tr>
                    <tr>
             
                        <td colspan="2">
                            <div id="ct">
                                <asp:HyperLink ID="HyperLink3" runat="server" Width="100pt"
                                    NavigateUrl='<%# "Detail.aspx?ID="+Eval("ID") %>'>.</asp:HyperLink>
                            </div>
                        </td>
                    </tr>
                </table>
                </div>
        </ItemTemplate>
    </asp:DataList>
       </div>
    <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:MayPhatDien %>" SelectCommand="SELECT * FROM categories AS ca INNER JOIN machine AS mc ON ca.id = mc.idcategories WHERE (ca.id = 1)"></asp:SqlDataSource>
</asp:Content>

